package com.project.bean;
import java.time.LocalDateTime;

/**
 * 回帖表
 */
public class RepliesBean {
    /**id*/
    private int id;
    /**内容*/
    private String info;
    /**日期*/
    private LocalDateTime time=LocalDateTime.now();

    private String name;

    private UserBean user;

    private TopicBean topic;

    public RepliesBean() {
    }

    public RepliesBean(String info,String name, int  userId, int topicId) {
        this.info = info;
        this.name = name;
        this.user =new UserBean();
        this.topic =new TopicBean();
        this.user.setId(userId);
        this.topic.setId(topicId);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public LocalDateTime getTime() {
        return time;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public TopicBean getTopic() {
        return topic;
    }

    public void setTopic(TopicBean topic) {
        this.topic = topic;
    }

    public void setTime(LocalDateTime time) {
        this.time = time;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "RepliesBean{" +
                "id=" + id +
                ", info='" + info + '\'' +
                ", time=" + time +
                ", name='" + name + '\'' +
                ", user=" + user +
                ", topic=" + topic +
                "'}\n";
    }
}
